package com.ruoyi.project.system.inspectreport.service.impl;

import com.ruoyi.common.utils.text.Convert;
import com.ruoyi.project.system.inspectreport.domain.InspectReport;
import com.ruoyi.project.system.inspectreport.mapper.InspectReportMapper;
import com.ruoyi.project.system.inspectreport.service.IInspectReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 检验报告Service业务层处理
 * 
 * @author LCL
 * @date 2020-12-11
 */
@Service
public class InspectReportServiceImpl implements IInspectReportService 
{
    @Autowired
    private InspectReportMapper inspectReportMapper;

    /**
     * 查询检验报告
     * 
     * @param id 检验报告ID
     * @return 检验报告
     */
    @Override
    public InspectReport selectInspectReportById(String id)
    {
        return inspectReportMapper.selectInspectReportById(id);
    }

    /**
     * 查询检验报告列表
     * 
     * @param inspectReport 检验报告
     * @return 检验报告
     */
    @Override
    public List<InspectReport> selectInspectReportList(InspectReport inspectReport)
    {
        return inspectReportMapper.selectInspectReportList(inspectReport);
    }

    /**
     * 新增检验报告
     * 
     * @param inspectReport 检验报告
     * @return 结果
     */
    @Override
    public int insertInspectReport(InspectReport inspectReport)
    {
        return inspectReportMapper.insertInspectReport(inspectReport);
    }

    /**
     * 修改检验报告
     * 
     * @param inspectReport 检验报告
     * @return 结果
     */
    @Override
    public int updateInspectReport(InspectReport inspectReport)
    {
        return inspectReportMapper.updateInspectReport(inspectReport);
    }

    /**
     * 删除检验报告对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteInspectReportByIds(String ids)
    {
        return inspectReportMapper.deleteInspectReportByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除检验报告信息
     * 
     * @param id 检验报告ID
     * @return 结果
     */
    @Override
    public int deleteInspectReportById(String id)
    {
        return inspectReportMapper.deleteInspectReportById(id);
    }
}
